____ _ _ _ _
| _ \ ___ | |_ (_) _ __ ___ __| | (_) __ _
| |_) | / _ \ | __| | | | '_ \ / _ \ / _| | | | / _ |
| _ < | __/ | |_ | | | |_) | | __/ | (_| | | | | (_| |
|_| \_\ \___| \__| |_| | .__/ \___| \__,_| |_| \__,_|
|_|
- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b- `b
Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―Β―
Tiny Encryption Algorithm
part 2/3 Β· 7.6 KB total
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Referenzcode
Es folgt die Adaptierung der Referenzimplementierung der Ver- und EntschlΓΌsselungsroutinen in C, die als Public Domain von David Wheeler und Roger Needham verΓΆffentlicht wurde:
void encrypt(unsigned long v[2], unsigned long k[4]) {
unsigned long v0 = v[0], v1 = v[1], sum = 0, i; /* set up */
unsigned long delta = 0x9E3779B9; /* a key schedule constant */
unsigned long k0 = k[0], k1 = k[1], k2 = k[2], k3 = k[3]; /* cache key */
for (i = 0; i<32; i++) { /* basic cycle start */
sum += delta;
v0 += ((v1<<4) + k0) ^ (v1 + sum) ^ ((v1>>5) + k1);
v1 += ((v0<<4) + k2) ^ (v0 + sum) ^ ((v0>>5) + k3); /* end cycle */
}
v[0] = v0; v[1] = v1;
}
void decrypt(unsigned long v[2], unsigned long k[4]) {
unsigned long v0 = v[0], v1 = v[1], sum = 0xC6EF3720, i; /* set up; sum is 32*delta */
unsigned long delta = 0x9E3779B9; /* a key schedule constant */
unsigned long k0 = k[0], k1 = k[1], k2 = k[2], k3 = k[3]; /* cache key */
for(i = 0; i<32; i++) { /* basic cycle start */
v1 -= ((v0<<4) + k2) ^ (v0 + sum) ^ ((v0>>5) + k3);
v0 -= ((v1<<4) + k0) ^ (v1 + sum) ^ ((v1>>5) + k1);
sum -= delta; /* end cycle */
}
v[0] = v0; v[1] = v1;
}
Literatur
β’ David J. Wheeler, Roger M. Needham: TEA, a tiny encryption algorithm. In: Bart Preneel (Hrsg.): Fast Software Encryption: Second International Workshop, Leuven, Belgien, 14. bis 16. Dezember 1994. Lecture Notes in Computer Science, Volume 1008, S. 363β366.
β’ Vikram Reddy Andem: A Cryptanalysis of the Tiny Encryption Algorithm. (Memento vom 31. MΓ€rz 2012 im Internet Archive) (PDF) Masters thesis, The University of Alabama, Tuscaloosa, 2003.
β’ John Kelsey, Bruce Schneier, David Wagner: Key-schedule cryptanalysis of IDEA, G-DES, GOST, SAFER, and Triple-DES. In: Lecture Notes in Computer Science, 1996, 1109, Seiten 237β251.
β’ John Kelsey, Bruce Schneier, David Wagner: Related-key cryptanalysis of 3-WAY, Biham-DES, CAST, DES-X NewDES, RC2, and TEA. In: Lecture Notes in Computer Science, 1997, 1334, S. 233β246.
β’ Julio CΓ©sar HernΓ‘ndez, Pedro Isasi, Arturo Ribagorda: An application of genetic algorithms to the cryptoanalysis of one round TEA. In: Proceedings of the 2002 Symposium on Artificial Intelligence and its Application, 2002.
β’ Julio CΓ©sar HernΓ‘ndez, JosΓ© MarΓa Sierra, Pedro Isasi, Arturo Ribargorda: Finding efficient distinguishers for cryptographic mappings, with an application to the block cipher TEA. In: Proceedings of the 2003 Congress on Evolutionary Computation, 2003.
β’ Julio CΓ©sar HernΓ‘ndez, JosΓ© MarΓa Sierra, Arturo Ribagorda, BenjamΓn Ramos, J. C. Mex-Perera: Distinguishing TEA from a random permutation: Reduced round versions of TEA do not have the SAC or do not generate random numbers. In: Proceedings of the IMA Int. Conf. on Cryptography and Coding 2001, 2001, S. 374β377.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ